@echo off
REM 协议格式 "corbaloc:"["iiop"]":"<host>[":"<port>][/<keystring>]
set /p choice=please input(1): 
set TAO="E:\_proj\_opendds\ACE_wrappers\TAO"


echo start tao_cosnaming
start "tao_cosnaming" cmd /c %TAO%\orbsvcs\Naming_Service\tao_cosnaming.exe -ORBListenEndpoints iiop://localhost:2809
REM 查找命名服务 orb->string_to_object(url)

timeout /t 1 >nul
echo start MessengerServer.exe
REM MessengerServer url   
REM 方式1  -ORBDefaultInitRef corbaloc::localhost  
REM 方式2  -ORBInitRef NameService=corbaloc::localhost/NameService
REM 方式3  -ORBInitRef NameService=corbaloc::localhost:2809/NameService
start "MessengerServer" cmd /c %TAO%\\orbsvcs\DevGuideExamples\NamingService\corbaloc_Messenger\MessengerServer.exe -ORBInitRef NameService=corbaloc::localhost/NameService

timeout /t 2 >nul
echo start MessengerClient.exe
timeout /t 4 >nul
start "MessengerClient" cmd /k %TAO%\\orbsvcs\DevGuideExamples\NamingService\corbaloc_Messenger\MessengerClient.exe corbaloc::localhost/NameService
